//package com.feiyu.order.config;
//
//import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver;
//import org.springframework.beans.factory.ObjectProvider;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.converter.HttpMessageConverter;
//
//import java.util.Objects;
//import java.util.stream.Collectors;
//
///**
// * @Author: Doate
// * @Date: Created in 2021/4/13 0:29
// * @Description:
// */
//@Configuration
//public class HttpMsgConverConfig {
//    @Bean
//    KeyResolver userKeyResolver() {
//        return exchange -> Mono.just(Objects.requireNonNull(exchange.getRequest().getRemoteAddress()).getAddress().getHostAddress());
//    }
//
//    @Bean
//    @ConditionalOnMissingBean
//    public HttpMessageConverters messageConverters(ObjectProvider<HttpMessageConverter<?>> converters) {
//        return new HttpMessageConverters(converters.orderedStream().collect(Collectors.toList()));
//    }
//}